package cn.scw.project.facility.mapper;

import cn.scw.project.facility.domain.FacPrintPrice;
import cn.scw.project.facility.domain.vo.FacPrintPriceVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 默认打印价格Mapper接口
 *
 * @author api
 * @date 2020-05-20
 */
public interface FacPrintPriceMapper {
    /**
     * 查询默认打印价格
     *
     * @param id 默认打印价格ID
     * @return 默认打印价格
     */
    FacPrintPrice selectFacPrintPriceById(@Param("id") Long id);

    FacPrintPriceVo selectFacPrintPriceVoById(@Param("id") Long id);


    /**
     * 查询默认打印价格列表
     *
     * @return 默认打印价格集合
     */
    List<FacPrintPriceVo> selectFacPrintPriceList();

    /**
     * 新增默认打印价格
     *
     * @param facPrintPrice 默认打印价格
     * @return 结果
     */
    int insertFacPrintPrice(FacPrintPrice facPrintPrice);

    /**
     * 修改默认打印价格
     *
     * @param facPrintPrice 默认打印价格
     * @return 结果
     */
    int updateFacPrintPrice(FacPrintPrice facPrintPrice);

    /**
     * 删除默认打印价格
     *
     * @param id 默认打印价格ID
     * @return 结果
     */
    int deleteFacPrintPriceById(Long id);

    /**
     * 批量删除默认打印价格
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    int deleteFacPrintPriceByIds(Long[] ids);

    boolean existsByTypeAndIsColoursAndIsDoubleFacedAndPaperNumber(@Param("type") String type, @Param("isColours") boolean isColours, @Param("isDoubleFaced") boolean isDoubleFaced, @Param("paperNumber") int paperNumber);

    FacPrintPriceVo selectByTypeAndIsColoursAndIsDoubleFacedAndPaperNumber(@Param("type") String type, @Param("isColours") boolean isColours, @Param("isDoubleFaced") boolean isDoubleFaced, @Param("paperNumber") int paperNumber);
}
